<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>oauth2client.client</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="oauth2client-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="oauth2client-module.html">Package&nbsp;oauth2client</a> ::
        Module&nbsp;client
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="oauth2client.client-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module client</h1><p class="nomargin-top"><span class="codelink"><a href="oauth2client.client-pysrc.html">source&nbsp;code</a></span></p>
<pre class="literalblock">
An OAuth 2.0 client.

Tools for interacting with OAuth 2.0 protected resources.

</pre>

<hr />
<div class="fields">      <p><strong>Author:</strong>
        jcgregorio@google.com (Joe Gregorio)
      </p>
</div><!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="oauth2client.client.Error-class.html" class="summary-name">Error</a><br />
      Base error for this module.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="oauth2client.client.FlowExchangeError-class.html" class="summary-name">FlowExchangeError</a><br />
      Error trying to exchange an authorization grant for an access token.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="oauth2client.client.AccessTokenRefreshError-class.html" class="summary-name">AccessTokenRefreshError</a><br />
      Error trying to refresh an expired access token.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="oauth2client.client.TokenRevokeError-class.html" class="summary-name">TokenRevokeError</a><br />
      Error trying to revoke a token.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="oauth2client.client.UnknownClientSecretsFlowError-class.html" class="summary-name">UnknownClientSecretsFlowError</a><br />
      The client secrets file called for an unknown type of OAuth 2.0 flow.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="oauth2client.client.AccessTokenCredentialsError-class.html" class="summary-name">AccessTokenCredentialsError</a><br />
      Having only the access_token means no refresh is possible.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="oauth2client.client.VerifyJwtTokenError-class.html" class="summary-name">VerifyJwtTokenError</a><br />
      Could not retrieve certificates for validation.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="oauth2client.client.NonAsciiHeaderError-class.html" class="summary-name">NonAsciiHeaderError</a><br />
      Header names and values must be ASCII strings.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="oauth2client.client.ApplicationDefaultCredentialsError-class.html" class="summary-name">ApplicationDefaultCredentialsError</a><br />
      Error retrieving the Application Default Credentials.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="oauth2client.client.OAuth2DeviceCodeError-class.html" class="summary-name">OAuth2DeviceCodeError</a><br />
      Error trying to retrieve a device code.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="oauth2client.client.CryptoUnavailableError-class.html" class="summary-name">CryptoUnavailableError</a><br />
      Raised when a crypto library is required, but none is available.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="oauth2client.client.MemoryCache-class.html" class="summary-name">MemoryCache</a><br />
      httplib2 Cache implementation which only caches locally.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="oauth2client.client.Credentials-class.html" class="summary-name">Credentials</a><br />
      Base class for all Credentials objects.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="oauth2client.client.Flow-class.html" class="summary-name">Flow</a><br />
      Base class for all Flow objects.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="oauth2client.client.Storage-class.html" class="summary-name">Storage</a><br />
      Base class for all Storage objects.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="oauth2client.client.OAuth2Credentials-class.html" class="summary-name">OAuth2Credentials</a><br />
      Credentials object for OAuth 2.0.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="oauth2client.client.AccessTokenCredentials-class.html" class="summary-name">AccessTokenCredentials</a><br />
      Credentials object for OAuth 2.0.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="oauth2client.client.GoogleCredentials-class.html" class="summary-name">GoogleCredentials</a><br />
      Application Default Credentials for use in calling Google APIs.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="oauth2client.client.AssertionCredentials-class.html" class="summary-name">AssertionCredentials</a><br />
      Abstract Credentials object used for OAuth 2.0 assertion grants.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="oauth2client.client.SignedJwtAssertionCredentials-class.html" class="summary-name">SignedJwtAssertionCredentials</a><br />
      Credentials object used for OAuth 2.0 Signed JWT assertion grants.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="oauth2client.client.DeviceFlowInfo-class.html" class="summary-name">DeviceFlowInfo</a><br />
      Intermediate information the OAuth2 for devices flow.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="oauth2client.client.OAuth2WebServerFlow-class.html" class="summary-name">OAuth2WebServerFlow</a><br />
      Does the Web Server Flow for OAuth 2.0.
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_abstract"></a><span class="summary-sig-name">_abstract</span>()</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.client-pysrc.html#_abstract">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="oauth2client.client-module.html#clean_headers" class="summary-sig-name">clean_headers</a>(<span class="summary-sig-arg">headers</span>)</span><br />
      Forces header keys and values to be strings, i.e not unicode.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.client-pysrc.html#clean_headers">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="oauth2client.client-module.html#_update_query_params" class="summary-sig-name" onclick="show_private();">_update_query_params</a>(<span class="summary-sig-arg">uri</span>,
        <span class="summary-sig-arg">params</span>)</span><br />
      Updates a URI with new query parameters.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.client-pysrc.html#_update_query_params">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_get_environment"></a><span class="summary-sig-name">_get_environment</span>(<span class="summary-sig-arg">urlopen</span>=<span class="summary-sig-default">None</span>)</span><br />
      Detect the environment the code is being run on.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.client-pysrc.html#_get_environment">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="oauth2client.client-module.html#save_to_well_known_file" class="summary-sig-name">save_to_well_known_file</a>(<span class="summary-sig-arg">credentials</span>,
        <span class="summary-sig-arg">well_known_file</span>=<span class="summary-sig-default">None</span>)</span><br />
      Save the provided GoogleCredentials to the well known file.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.client-pysrc.html#save_to_well_known_file">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_get_environment_variable_file"></a><span class="summary-sig-name">_get_environment_variable_file</span>()</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.client-pysrc.html#_get_environment_variable_file">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_get_well_known_file"></a><span class="summary-sig-name">_get_well_known_file</span>()</span><br />
      Get the well known file produced by command 'gcloud auth login'.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.client-pysrc.html#_get_well_known_file">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_get_application_default_credential_from_file"></a><span class="summary-sig-name">_get_application_default_credential_from_file</span>(<span class="summary-sig-arg">application_default_credential_filename</span>)</span><br />
      Build the Application Default Credentials from file.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.client-pysrc.html#_get_application_default_credential_from_file">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_raise_exception_for_missing_fields"></a><span class="summary-sig-name">_raise_exception_for_missing_fields</span>(<span class="summary-sig-arg">missing_fields</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.client-pysrc.html#_raise_exception_for_missing_fields">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_raise_exception_for_reading_json"></a><span class="summary-sig-name">_raise_exception_for_reading_json</span>(<span class="summary-sig-arg">credential_file</span>,
        <span class="summary-sig-arg">extra_help</span>,
        <span class="summary-sig-arg">error</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.client-pysrc.html#_raise_exception_for_reading_json">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_get_application_default_credential_GAE"></a><span class="summary-sig-name">_get_application_default_credential_GAE</span>()</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.client-pysrc.html#_get_application_default_credential_GAE">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_get_application_default_credential_GCE"></a><span class="summary-sig-name">_get_application_default_credential_GCE</span>()</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.client-pysrc.html#_get_application_default_credential_GCE">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="oauth2client.client-module.html#_RequireCryptoOrDie" class="summary-sig-name" onclick="show_private();">_RequireCryptoOrDie</a>()</span><br />
      Ensure we have a crypto library, or throw CryptoUnavailableError.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.client-pysrc.html#_RequireCryptoOrDie">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="oauth2client.client-module.html#verify_id_token" class="summary-sig-name">verify_id_token</a>(<span class="summary-sig-arg">id_token</span>,
        <span class="summary-sig-arg">audience</span>,
        <span class="summary-sig-arg">http</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">cert_uri</span>=<span class="summary-sig-default">ID_TOKEN_VERIFICATION_CERTS</span>)</span><br />
      Verifies a signed JWT id_token.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.client-pysrc.html#verify_id_token">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_urlsafe_b64decode"></a><span class="summary-sig-name">_urlsafe_b64decode</span>(<span class="summary-sig-arg">b64string</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.client-pysrc.html#_urlsafe_b64decode">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="oauth2client.client-module.html#_extract_id_token" class="summary-sig-name" onclick="show_private();">_extract_id_token</a>(<span class="summary-sig-arg">id_token</span>)</span><br />
      Extract the JSON payload from a JWT.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.client-pysrc.html#_extract_id_token">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="oauth2client.client-module.html#_parse_exchange_token_response" class="summary-sig-name" onclick="show_private();">_parse_exchange_token_response</a>(<span class="summary-sig-arg">content</span>)</span><br />
      Parses response of an exchange token request.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.client-pysrc.html#_parse_exchange_token_response">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="oauth2client.client-module.html#credentials_from_code" class="summary-sig-name">credentials_from_code</a>(<span class="summary-sig-arg">client_id</span>,
        <span class="summary-sig-arg">client_secret</span>,
        <span class="summary-sig-arg">scope</span>,
        <span class="summary-sig-arg">code</span>,
        <span class="summary-sig-arg">redirect_uri</span>=<span class="summary-sig-default">'postmessage'</span>,
        <span class="summary-sig-arg">http</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">user_agent</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">token_uri</span>=<span class="summary-sig-default">GOOGLE_TOKEN_URI</span>,
        <span class="summary-sig-arg">auth_uri</span>=<span class="summary-sig-default">GOOGLE_AUTH_URI</span>,
        <span class="summary-sig-arg">revoke_uri</span>=<span class="summary-sig-default">GOOGLE_REVOKE_URI</span>,
        <span class="summary-sig-arg">device_uri</span>=<span class="summary-sig-default">GOOGLE_DEVICE_URI</span>)</span><br />
      Exchanges an authorization code for an OAuth2Credentials object.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.client-pysrc.html#credentials_from_code">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="oauth2client.client-module.html#credentials_from_clientsecrets_and_code" class="summary-sig-name">credentials_from_clientsecrets_and_code</a>(<span class="summary-sig-arg">filename</span>,
        <span class="summary-sig-arg">scope</span>,
        <span class="summary-sig-arg">code</span>,
        <span class="summary-sig-arg">message</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">redirect_uri</span>=<span class="summary-sig-default">'postmessage'</span>,
        <span class="summary-sig-arg">http</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">cache</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">device_uri</span>=<span class="summary-sig-default">None</span>)</span><br />
      Returns OAuth2Credentials from a clientsecrets file and an auth code.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.client-pysrc.html#credentials_from_clientsecrets_and_code">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="oauth2client.client-module.html#flow_from_clientsecrets" class="summary-sig-name">flow_from_clientsecrets</a>(<span class="summary-sig-arg">filename</span>,
        <span class="summary-sig-arg">scope</span>,
        <span class="summary-sig-arg">redirect_uri</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">message</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">cache</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">login_hint</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">device_uri</span>=<span class="summary-sig-default">None</span>)</span><br />
      Create a Flow from a clientsecrets file.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.client-pysrc.html#flow_from_clientsecrets">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="HAS_CRYPTO"></a><span class="summary-name">HAS_CRYPTO</span> = <code title="True">True</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="HAS_OPENSSL"></a><span class="summary-name">HAS_OPENSSL</span> = <code title="True">True</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="logger"></a><span class="summary-name">logger</span> = <code title="logging.getLogger(__name__)">logging.getLogger(__name__)</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="EXPIRY_FORMAT"></a><span class="summary-name">EXPIRY_FORMAT</span> = <code title="'%Y-%m-%dT%H:%M:%SZ'">'%Y-%m-%dT%H:%M:%SZ'</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="oauth2client.client-module.html#ID_TOKEN_VERIFICATION_CERTS" class="summary-name">ID_TOKEN_VERIFICATION_CERTS</a> = <code title="'https://www.googleapis.com/oauth2/v1/certs'">'https://www.googleapis.com/oaut<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="oauth2client.client-module.html#ID_TOKEN_VERIFICATON_CERTS" class="summary-name">ID_TOKEN_VERIFICATON_CERTS</a> = <code title="'https://www.googleapis.com/oauth2/v1/certs'">'https://www.googleapis.com/oauth<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="OOB_CALLBACK_URN"></a><span class="summary-name">OOB_CALLBACK_URN</span> = <code title="'urn:ietf:wg:oauth:2.0:oob'">'urn:ietf:wg:oauth:2.0:oob'</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="REFRESH_STATUS_CODES"></a><span class="summary-name">REFRESH_STATUS_CODES</span> = <code title="[401]">[401]</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="AUTHORIZED_USER"></a><span class="summary-name">AUTHORIZED_USER</span> = <code title="'authorized_user'">'authorized_user'</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SERVICE_ACCOUNT"></a><span class="summary-name">SERVICE_ACCOUNT</span> = <code title="'service_account'">'service_account'</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="GOOGLE_APPLICATION_CREDENTIALS"></a><span class="summary-name">GOOGLE_APPLICATION_CREDENTIALS</span> = <code title="'GOOGLE_APPLICATION_CREDENTIALS'">'GOOGLE_APPLICATION_CREDENTIALS'</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="oauth2client.client-module.html#ADC_HELP_MSG" class="summary-name">ADC_HELP_MSG</a> = <code title="'The Application Default Credentials are not available. They are avail\
able ' 'if running in Google Compute Engine. Otherwise, the environmen\
t variable '+ GOOGLE_APPLICATION_CREDENTIALS+ ' must be defined pointi\
ng to a file defining the credentials. See ' 'https://developers.googl\
e.com/accounts/docs/application-default-credentials' ' for more inform\
ation.'">'The Application Default Credentials are not av<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="oauth2client.client-module.html#AccessTokenInfo" class="summary-name">AccessTokenInfo</a> = <code title="collections.namedtuple('AccessTokenInfo', ['access_token', 'expires_in\
'])">collections.namedtuple('AccessTokenInfo', ['<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_env_name"></a><span class="summary-name">_env_name</span> = <code title="None">None</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_cached_http"></a><span class="summary-name">_cached_http</span> = <code title="httplib2.Http(MemoryCache())">httplib2.Http(MemoryCache())</code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="clean_headers"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">clean_headers</span>(<span class="sig-arg">headers</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="oauth2client.client-pysrc.html#clean_headers">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Forces header keys and values to be strings, i.e not unicode.

The httplib module just concats the header keys and values in a way that may
make the message header a unicode string, which, if it then tries to
contatenate to a binary request body may result in a unicode decode error.

Args:
  headers: dict, A dictionary of headers.

Returns:
  The same dictionary but with all the keys converted to strings.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_update_query_params"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_update_query_params</span>(<span class="sig-arg">uri</span>,
        <span class="sig-arg">params</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="oauth2client.client-pysrc.html#_update_query_params">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Updates a URI with new query parameters.

Args:
  uri: string, A valid URI, with potential existing query parameters.
  params: dict, A dictionary of query parameters.

Returns:
  The same URI but with the new query parameters added.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="save_to_well_known_file"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">save_to_well_known_file</span>(<span class="sig-arg">credentials</span>,
        <span class="sig-arg">well_known_file</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="oauth2client.client-pysrc.html#save_to_well_known_file">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Save the provided GoogleCredentials to the well known file.

Args:
  credentials:
    the credentials to be saved to the well known file;
    it should be an instance of GoogleCredentials
  well_known_file:
    the name of the file where the credentials are to be saved;
    this parameter is supposed to be used for testing only

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_RequireCryptoOrDie"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_RequireCryptoOrDie</span>()</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="oauth2client.client-pysrc.html#_RequireCryptoOrDie">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Ensure we have a crypto library, or throw CryptoUnavailableError.

The oauth2client.crypt module requires either PyCrypto or PyOpenSSL
to be available in order to function, but these are optional
dependencies.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="verify_id_token"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">verify_id_token</span>(<span class="sig-arg">id_token</span>,
        <span class="sig-arg">audience</span>,
        <span class="sig-arg">http</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">cert_uri</span>=<span class="sig-default">ID_TOKEN_VERIFICATION_CERTS</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="oauth2client.client-pysrc.html#verify_id_token">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Verifies a signed JWT id_token.

This function requires PyOpenSSL and because of that it does not work on
App Engine.

Args:
  id_token: string, A Signed JWT.
  audience: string, The audience 'aud' that the token should be for.
  http: httplib2.Http, instance to use to make the HTTP request. Callers
    should supply an instance that has caching enabled.
  cert_uri: string, URI of the certificates in JSON format to
    verify the JWT against.

Returns:
  The deserialized JSON in the JWT.

Raises:
  oauth2client.crypt.AppIdentityError: if the JWT fails to verify.
  CryptoUnavailableError: if no crypto library is available.

</pre>
  <dl class="fields">
    <dt>Decorators:</dt>
    <dd><ul class="nomargin-top">
        <li><code>@util.positional(2)</code></li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="_extract_id_token"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_extract_id_token</span>(<span class="sig-arg">id_token</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="oauth2client.client-pysrc.html#_extract_id_token">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Extract the JSON payload from a JWT.

Does the extraction w/o checking the signature.

Args:
  id_token: string, OAuth 2.0 id_token.

Returns:
  object, The deserialized JSON payload.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_parse_exchange_token_response"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_parse_exchange_token_response</span>(<span class="sig-arg">content</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="oauth2client.client-pysrc.html#_parse_exchange_token_response">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Parses response of an exchange token request.

Most providers return JSON but some (e.g. Facebook) return a
url-encoded string.

Args:
  content: The body of a response

Returns:
  Content as a dictionary object. Note that the dict could be empty,
  i.e. {}. That basically indicates a failure.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="credentials_from_code"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">credentials_from_code</span>(<span class="sig-arg">client_id</span>,
        <span class="sig-arg">client_secret</span>,
        <span class="sig-arg">scope</span>,
        <span class="sig-arg">code</span>,
        <span class="sig-arg">redirect_uri</span>=<span class="sig-default">'postmessage'</span>,
        <span class="sig-arg">http</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">user_agent</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">token_uri</span>=<span class="sig-default">GOOGLE_TOKEN_URI</span>,
        <span class="sig-arg">auth_uri</span>=<span class="sig-default">GOOGLE_AUTH_URI</span>,
        <span class="sig-arg">revoke_uri</span>=<span class="sig-default">GOOGLE_REVOKE_URI</span>,
        <span class="sig-arg">device_uri</span>=<span class="sig-default">GOOGLE_DEVICE_URI</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="oauth2client.client-pysrc.html#credentials_from_code">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Exchanges an authorization code for an OAuth2Credentials object.

Args:
  client_id: string, client identifier.
  client_secret: string, client secret.
  scope: string or iterable of strings, scope(s) to request.
  code: string, An authroization code, most likely passed down from
    the client
  redirect_uri: string, this is generally set to 'postmessage' to match the
    redirect_uri that the client specified
  http: httplib2.Http, optional http instance to use to do the fetch
  token_uri: string, URI for token endpoint. For convenience
    defaults to Google's endpoints but any OAuth 2.0 provider can be used.
  auth_uri: string, URI for authorization endpoint. For convenience
    defaults to Google's endpoints but any OAuth 2.0 provider can be used.
  revoke_uri: string, URI for revoke endpoint. For convenience
    defaults to Google's endpoints but any OAuth 2.0 provider can be used.
  device_uri: string, URI for device authorization endpoint. For convenience
    defaults to Google's endpoints but any OAuth 2.0 provider can be used.

Returns:
  An OAuth2Credentials object.

Raises:
  FlowExchangeError if the authorization code cannot be exchanged for an
   access token

</pre>
  <dl class="fields">
    <dt>Decorators:</dt>
    <dd><ul class="nomargin-top">
        <li><code>@util.positional(4)</code></li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="credentials_from_clientsecrets_and_code"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">credentials_from_clientsecrets_and_code</span>(<span class="sig-arg">filename</span>,
        <span class="sig-arg">scope</span>,
        <span class="sig-arg">code</span>,
        <span class="sig-arg">message</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">redirect_uri</span>=<span class="sig-default">'postmessage'</span>,
        <span class="sig-arg">http</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">cache</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">device_uri</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="oauth2client.client-pysrc.html#credentials_from_clientsecrets_and_code">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Returns OAuth2Credentials from a clientsecrets file and an auth code.

Will create the right kind of Flow based on the contents of the clientsecrets
file or will raise InvalidClientSecretsError for unknown types of Flows.

Args:
  filename: string, File name of clientsecrets.
  scope: string or iterable of strings, scope(s) to request.
  code: string, An authorization code, most likely passed down from
    the client
  message: string, A friendly string to display to the user if the
    clientsecrets file is missing or invalid. If message is provided then
    sys.exit will be called in the case of an error. If message in not
    provided then clientsecrets.InvalidClientSecretsError will be raised.
  redirect_uri: string, this is generally set to 'postmessage' to match the
    redirect_uri that the client specified
  http: httplib2.Http, optional http instance to use to do the fetch
  cache: An optional cache service client that implements get() and set()
    methods. See clientsecrets.loadfile() for details.
  device_uri: string, OAuth 2.0 device authorization endpoint

Returns:
  An OAuth2Credentials object.

Raises:
  FlowExchangeError if the authorization code cannot be exchanged for an
   access token
  UnknownClientSecretsFlowError if the file describes an unknown kind of Flow.
  clientsecrets.InvalidClientSecretsError if the clientsecrets file is
    invalid.

</pre>
  <dl class="fields">
    <dt>Decorators:</dt>
    <dd><ul class="nomargin-top">
        <li><code>@util.positional(3)</code></li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="flow_from_clientsecrets"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">flow_from_clientsecrets</span>(<span class="sig-arg">filename</span>,
        <span class="sig-arg">scope</span>,
        <span class="sig-arg">redirect_uri</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">message</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">cache</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">login_hint</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">device_uri</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="oauth2client.client-pysrc.html#flow_from_clientsecrets">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Create a Flow from a clientsecrets file.

Will create the right kind of Flow based on the contents of the clientsecrets
file or will raise InvalidClientSecretsError for unknown types of Flows.

Args:
  filename: string, File name of client secrets.
  scope: string or iterable of strings, scope(s) to request.
  redirect_uri: string, Either the string 'urn:ietf:wg:oauth:2.0:oob' for
    a non-web-based application, or a URI that handles the callback from
    the authorization server.
  message: string, A friendly string to display to the user if the
    clientsecrets file is missing or invalid. If message is provided then
    sys.exit will be called in the case of an error. If message in not
    provided then clientsecrets.InvalidClientSecretsError will be raised.
  cache: An optional cache service client that implements get() and set()
    methods. See clientsecrets.loadfile() for details.
  login_hint: string, Either an email address or domain. Passing this hint
    will either pre-fill the email box on the sign-in form or select the
    proper multi-login session, thereby simplifying the login flow.
  device_uri: string, URI for device authorization endpoint. For convenience
    defaults to Google's endpoints but any OAuth 2.0 provider can be used.

Returns:
  A Flow object.

Raises:
  UnknownClientSecretsFlowError if the file describes an unknown kind of Flow.
  clientsecrets.InvalidClientSecretsError if the clientsecrets file is
    invalid.

</pre>
  <dl class="fields">
    <dt>Decorators:</dt>
    <dd><ul class="nomargin-top">
        <li><code>@util.positional(2)</code></li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="ID_TOKEN_VERIFICATION_CERTS"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">ID_TOKEN_VERIFICATION_CERTS</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
'https://www.googleapis.com/oauth2/v1/certs'
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="ID_TOKEN_VERIFICATON_CERTS"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">ID_TOKEN_VERIFICATON_CERTS</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
'https://www.googleapis.com/oauth2/v1/certs'
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="ADC_HELP_MSG"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">ADC_HELP_MSG</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
'The Application Default Credentials are not available. They are avail<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
able ' 'if running in Google Compute Engine. Otherwise, the environmen<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
t variable '+ GOOGLE_APPLICATION_CREDENTIALS+ ' must be defined pointi<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
ng to a file defining the credentials. See ' 'https://developers.googl<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
e.com/accounts/docs/application-default-credentials' ' for more inform<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
ation.'
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="AccessTokenInfo"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">AccessTokenInfo</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
collections.namedtuple('AccessTokenInfo', ['access_token', 'expires_in<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
'])
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="oauth2client-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Thu Nov 13 12:43:42 2014
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
